export default {
  state: () => ({ userName: '张三' }),
  mutations: {
    setUserInfo(state: any, value: any) {
      state.userName = value
    },
  },
  actions: {
    login({ commit }: any, userData: object) {
      setTimeout(() => {
        commit('setUserInfo', userData)
      }, 100)
    },
  },
}
